//
//  Team9ClassifyTableViewCell.m
//  Team9Project
//
//  Created by dllo on 15/10/14.
//  Copyright © 2015年 apple. All rights reserved.
//

#import "Team9ClassifyTableViewCell.h"
#import <Masonry.h>

#define WID 375.0
//#define HEI 667.0

@implementation Team9ClassifyTableViewCell


- (instancetype)initWithStyle:(UITableViewCellStyle)style reuseIdentifier:(NSString *)reuseIdentifier{
    self = [super initWithStyle:style reuseIdentifier:reuseIdentifier];
    if (self) {
        [self createView];
    }
    return self;
}


- (void)createView{
    self.classifyLabel = [[Team9BaseLabel alloc] init];
    [self.contentView addSubview:self.classifyLabel];
    self.classifyLabel.font = [UIFont systemFontOfSize:16 / WID * WIDTH];
    
    self.imageview = [[UIImageView alloc] init];
    [self.contentView addSubview:self.imageview];
}

- (void)layoutSubviews{
    [super layoutSubviews];
    
    
    [self.classifyLabel mas_makeConstraints:^(MASConstraintMaker *make) {
        make.left.equalTo(self.contentView.mas_left).offset(20 / WID * WIDTH);
        make.width.equalTo(@(100 / WID * WIDTH));
        make.height.equalTo(@(40 / WID * WIDTH));
    }];
    
    [self.imageview mas_makeConstraints:^(MASConstraintMaker *make) {
        make.top.right.equalTo(self.contentView);
        make.width.height.equalTo(self.contentView.mas_height);
        
    }];
    
}


@end
